package com.xuxueli.crawler.test.entity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.sql.Timestamp;

@Entity
public class Cartdetail {
    private String id;
    private String name;
    private String kc;
    private Timestamp createime;
    private Long count;
    private String href;
    private String storename;


    @Id
    @Column(name = "ID")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "NAME")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "KC")
    public String getKc() {
        return kc;
    }

    public void setKc(String kc) {
        this.kc = kc;
    }

    @Basic
    @Column(name = "CREATEIME")
    public Timestamp getCreateime() {
        return createime;
    }

    public void setCreateime(Timestamp createime) {
        this.createime = createime;
    }

    @Basic
    @Column(name = "COUNT")
    public Long getCount() {
        return count;
    }

    public void setCount(Long count) {
        this.count = count;
    }

    @Basic
    @Column(name = "HREF")
    public String getHref() {
        return href;
    }

    public void setHref(String href) {
        this.href = href;
    }

    @Basic
    @Column(name = "STORENAME")
    public String getStorename() {
        return storename;
    }

    public void setStorename(String storename) {
        this.storename = storename;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Cartdetail that = (Cartdetail) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (name != null ? !name.equals(that.name) : that.name != null) return false;
        if (kc != null ? !kc.equals(that.kc) : that.kc != null) return false;
        if (createime != null ? !createime.equals(that.createime) : that.createime != null) return false;
        if (count != null ? !count.equals(that.count) : that.count != null) return false;
        if (href != null ? !href.equals(that.href) : that.href != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (kc != null ? kc.hashCode() : 0);
        result = 31 * result + (createime != null ? createime.hashCode() : 0);
        result = 31 * result + (count != null ? count.hashCode() : 0);
        result = 31 * result + (href != null ? href.hashCode() : 0);
        return result;
    }
}
